home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADAM.IN_ / oemnadam.inf
INI File  |  1996-07-12  |  33KB  |  847 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     "Jazz-Internal Bus"
  7. [Options]
  8.     AM1500T
  9.     AM1500T1
  10.     AM1500T2
  11. [FileConstants]
  12. ParamInf        = "NCPARAM.INF"
  13. UtilityInf      = "UTILITY.INF"
  14. subroutineinf   = "SUBROUTN.INF"
  15. SoftwareType    = "driver"
  16. Exit_Code       = 0
  17. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  18. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  19. EthernetCards  = { AM1500T, AM1500T1, AM1500T2 }
  20. Manufacturer    = "Microsoft"
  21. ProductMajorVersion     = "3"
  22. ProductMinorVersion     = "51"
  23. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  24. ProductSoftwareName     = "Am1500t"
  25. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\am1500t.sys"
  26. NetRuleSoftwareType     = "am1500tSys ndisDriver am1500tDriver"
  27. NetRuleSoftwareUse      = $(SoftwareType)
  28. NetRuleSoftwareBindForm = """Am1500tDriver"" yes no container"
  29. NetRuleSoftwareClass    = {"am1500tDriver basic"}
  30. NetRuleSoftwareBindable = { "am1500tDriver am1500tAdapter non exclusive 100" }
  31. ProductHardwareName     = "Am1500t"
  32. NetRuleHardwareType     = "am1500t am1500tAdapter"
  33. NetRuleHardwareBindForm = " yes yes container"
  34. NetRuleHardwareClass    = {"am1500tAdapter basic"}
  35. ProductOpSupport     = 134 
  36. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  37. ParamKeyName    = $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
  38. [GeneralConstants]
  39. from      = ""
  40. to        = ""
  41. ExitCodeOk     = 0
  42. ExitCodeCancel = 1
  43. ExitCodeFatal  = 2
  44. KeyNull         = ""
  45. MAXIMUM_ALLOWED   = 33554432
  46. RegistryErrorIndex = NO_ERROR
  47. KeyProduct      = ""
  48. KeyParameters   = ""
  49. TRUE            = 1
  50. FALSE           = 0
  51. NoTitle            = 0
  52. ExitState   = "Active"
  53. OldVersionExisted = $(FALSE)
  54. DriverPath      = $(!STF_NTPATH)\drivers
  55. [date]
  56.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  57. [Identify]
  58.     read-syms Identification
  59.     set Status     = STATUS_SUCCESSFUL
  60.     set Identifier = $(OptionType)
  61.     set Media      = #("Source Media Descriptions", 1, 1)
  62.     Return $(Status) $(Identifier) $(Media)
  63. [ReturnOptions]
  64.     set Status        = STATUS_FAILED
  65.     set OptionList     = {}
  66.     set OptionTextList = {}
  67.     set LanguageList = ^(LanguagesSupported, 1)
  68.     Ifcontains(i) $($0) in $(LanguageList)
  69.         ifstr(i) $($1) == ""
  70.            goto returnoptions
  71.         endif
  72.         set PlatformList = ^(PlatformsSupported, 1)
  73.         Ifcontains(i) $($1) in $(PlatformList)
  74.            goto returnoptions
  75.         else
  76.            set Status = STATUS_NOTSUPPORTED
  77.            goto finish_ReturnOptions
  78.         endif
  79.     else
  80.         set Status = STATUS_NOLANGUAGE
  81.         goto finish_ReturnOptions
  82.     endif
  83. returnoptions = +
  84.     set OptionList     = ^(Options, 1)
  85.     set OptionTextList = ^(OptionsText$($0), 1)
  86.     set Status         = STATUS_SUCCESSFUL
  87. finish_ReturnOptions = +
  88.     Return $(Status) $(OptionList) $(OptionTextList)
  89. [InstallOption]
  90.     set Option   = $($1)
  91.     set SrcDir   = $($2)
  92.     set AddCopy  = $($3)
  93.     set DoCopy   = $($4)
  94.     set DoConfig = $($5)
  95.     set LanguageList = ^(LanguagesSupported, 1)
  96.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  97.         Return STATUS_NOLANGUAGE
  98.     endif
  99.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  100.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  101.     set-subst LF = "\n"
  102.     read-syms GeneralConstants
  103.     read-syms FileConstants
  104.     read-syms DialogConstants$(!STF_LANGUAGE)
  105.     ifstr(i) $(!NTN_Origination) == "NCPA"
  106.         set Continue = $(OK)
  107.     endif
  108.     read-syms FileConstants$(!STF_LANGUAGE)
  109.     detect date
  110.     set-title  $(Function$(Option)Title)
  111.     set to   = Begin
  112.     set from = Begin
  113.     set CommonStatus = STATUS_SUCCESSFUL
  114.     EndWait
  115. Begin = +
  116.     set ActivateDetection = FALSE
  117.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  118.         set StartLabel = removeadapter
  119.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  120.         set StartLabel = UpgradeSoftware
  121.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  122.         set StartLabel = bindingadapter
  123.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  124.         set CommonStatus = STATUS_REBOOT
  125.         set ActivateDetection = TRUE
  126.         set StartLabel = configureadapter
  127.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  128.             Debug-Output "Cannot configure the DEC 100 driver software."
  129.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  130.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  131.                 Debug-Output "ShellCode error: cannot get an error string."
  132.                 goto ShellCodeError
  133.             endif
  134.             set Error = $($R0)
  135.             set from = end
  136.             set to = end
  137.             goto nonfatalinfo
  138.         endif
  139.     else
  140.         Debug-Output "AMD: PrepareDetection start"
  141.         Shell "" PrepareDetectionDll "AMDNCDET.DLL"
  142.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  143.             ifstr(i) $(DoCopy) == "YES"
  144.                 Install Install-Detection-Dll
  145.             endif
  146.             Shell "NCPARAM.INF" Param_ControlDetection DTEND
  147.             Shell "NCPARAM.INF" Param_ControlDetection DTSTART
  148.         Endif
  149.         Debug-Output "AMD: PrepareDetection end"
  150.         set StartLabel = installadapter
  151.         set OEM_ABANDON_OPTIONS = {}
  152.         set OEM_ABANDON_SOFTWARE = FALSE
  153.         set OEM_ABANDON_ON = TRUE
  154.         set ActivateDetection = TRUE
  155.     endif
  156.     Debug-Output "OEMNADWD.INF: =================================================="
  157.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  158.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  159.     Debug-Output "OEMNADWD.INF: Option is: "$(Option)
  160.     Debug-Output "OEMNADWD.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  161.     Debug-Output "OEMNADWD.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  162.     Debug-Output "OEMNADWD.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  163.     Debug-Output "OEMNADWD.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  164.     Debug-Output "OEMNADWD.INF: =================================================="
  165.     Set DetectedCard = FALSE
  166.     Ifstr(i) $(ActivateDetection) != TRUE
  167.         Goto skipdetection
  168.     Endif
  169.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  170.                     {IOADDR, IOBaseAddressDecList, IOBaseValue},+
  171.                     {DMACHANNEL, DMAChannelList, DMAChannel}}
  172.     Debug-Output "OEMNADWD.INF: Calling Param_BuildTypeLists"
  173.     Shell $(ParamInf) Param_BuildTypeLists AM1500T $(TypeList)
  174.     Set Status = $($R0)
  175.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  176.         Goto fataldetect
  177.     Endif
  178.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults"
  179.     Shell $(ParamInf) Param_SetDefaults {}
  180.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddressDecList)
  181.     Set IOBaseAddressHexList = $($R0)
  182.     Ifstr(i) $(!STF_NCDETECT) == YES
  183.         Ifstr(i) $(!STF_NCOPTION) == $(Option)
  184.            Set DetectedCard = TRUE
  185.            Debug-Output "OEMNADWD.INF: Setting DetectedCard to TRUE"
  186.         Endif
  187.     Endif
  188. skipdetection =+
  189.     set from = $(fatal)
  190.     set to = $(fatal)
  191.     goto $(StartLabel)
  192. installadapter = +
  193.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  194.     Ifstr $(KeyProduct) != $(KeyNull)
  195.         CloseRegKey $(KeyProduct)
  196.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  197.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(Option)Title),+
  198.                $(ProductVersion)
  199.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.                Debug-Output "ShellCode error: cannot get an error string."
  201.                goto ShellCodeError
  202.            endif
  203.            goto end
  204.         else
  205.            Shell $(UtilityInf), CardExistedDlg
  206.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  207.                Debug-Output "ShellCode error: cannot get an error string."
  208.                goto ShellCodeError
  209.            endif
  210.            ifstr(i) $($R1) != "OK"
  211.                Set CommonStatus = STATUS_USERCANCEL
  212.                goto end
  213.            endif
  214.            set OldVersionExisted = $(TRUE)
  215.         endif
  216.     endif
  217.     Ifstr(i) $(DetectedCard) != TRUE
  218.         Goto adaptersetup
  219.     Endif
  220.     StartWait
  221.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  222.     EndWait
  223.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  224.         Goto adaptersetup
  225.     Endif
  226.     Set DetectedParams = $($R1)
  227.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults to merge detected params"
  228.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  229.     goto adapteroptions
  230. configureadapter = +
  231.     Ifstr $(KeyProduct) == $(KeyNull)
  232.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  233.         Ifstr $(KeyProduct) == $(KeyNull)
  234.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  235.             Debug-Output "Cannot find component product key"
  236.             goto fatalregistry
  237.         Endif
  238.     Endif
  239.     Debug-Output "INF: Shelling to FindService"
  240.     Shell $(UtilityInf) FindService, $(KeyProduct)
  241.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  242.         Debug-Output "INF: FindService shell failure"
  243.         Goto ShellCodeError
  244.     Endif
  245.     Ifstr(i) $($R0) != NO_ERROR
  246.         Debug-Output "INF: FindService Shell error: "$($R0)
  247.         Goto fatalregistry
  248.     endif
  249.     set KeyParameters = $($R2)
  250.     CloseRegKey $($R1)
  251.     Ifstr $(KeyParameters) == $(KeyNull)
  252.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  253.         Debug-Output "Cannot find component service"
  254.         goto fatalregistry
  255.     endif
  256.     set OldVersionExisted = $(TRUE )
  257.     set ValueName = ""
  258.     set ValueData = ""
  259.     set ValueStr  = ""
  260.     set ValueList = {}
  261.     EnumRegValue $(KeyParameters) ValueList
  262.     ForListDo $(ValueList)
  263.         set ValueItem = $($)
  264.         set ValueName = *($(ValueItem),1)
  265.         set ValueData = *($(ValueItem),4)
  266.         Ifstr(i) $(ValueName) == "InterruptNumber"
  267.             set IRQLevel = $(ValueData)
  268.         else-Ifstr(i) $(ValueName) == "IOBaseAddress"
  269.             set IOBaseValue = $(ValueData)
  270.         else-Ifstr(i) $(ValueName) == "DMAChannel"
  271.             set DMAChannel = $(ValueData)
  272.         else-ifstr(i) $(ValueName) == "BusType"
  273.             set BusInterfaceType = $(ValueData)
  274.         else-ifstr(i) $(ValueName) == "BusNumber"
  275.             set BusNumber = $(ValueData)
  276.         endif
  277.     EndForListDo
  278. adaptersetup =+
  279.     Ifstr(i) $(DetectedCard) == TRUE
  280.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  281.             Goto adapterverify
  282.         Endif
  283.     Endif
  284.     goto adapteroptions
  285. adapteroptions = +
  286.     set from = adapteroptions
  287.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  288.         ifstr(i) $(!AutoNetInterfaceType) != ""
  289.             set BusInterfaceType = $(!AutoNetInterfaceType)
  290.         else
  291.             set BusInterfaceType = 1    
  292.         endif
  293.         ifstr(i) $(!AutoNetBusNumber) != ""
  294.             set BusNumber = $(!AutoNetBusNumber)
  295.         else
  296.             set BusNumber = 0
  297.         endif
  298.         goto adapterverify
  299.     endif
  300.     set IOBaseAddress = *($(IOBaseAddressHexList), ~($(IOBaseAddressDecList),+
  301.         $(IOBaseValue)))
  302.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  303.     ui start "InputDlg"
  304.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  305.         set IRQLevel = $(Combo1Out)
  306.         set DMAChannel = $(Combo2Out)
  307.         set IOBaseAddress = $(Combo3Out)
  308.         ui pop 1
  309.     else-ifstr(i) $(DLGEVENT) == "BACK"
  310.         set CommonStatus = STATUS_USERCANCEL
  311.         Debug-Output "Action: exit. Bye."
  312.         ui pop 1
  313.         goto end
  314.     else
  315.         ui pop 1
  316.         Debug-Output "Action: unknown. Bye."
  317.         goto end
  318.     endif
  319.     set IOBaseValue = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  320.         $(IOBaseAddress)))
  321.     ifstr(i) $(!STF_NCDETINFO) == {}
  322.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  323.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  324.             Debug-Output "ShellCode error."
  325.             goto ShellCodeError
  326.         endif
  327.         set BusInterfaceType = $($R1)
  328.         set BusNumber = $($R2)
  329.     else
  330.         set BusInterfaceType = *($(!STF_NCDETINFO),5)
  331.         set BusNumber = *($(!STF_NCDETINFO),6)
  332.     endif
  333. adapterverify =+
  334.     Ifstr(i) $(DetectedCard) != TRUE
  335.         Goto skipoptions
  336.     Endif
  337.     Debug-Output "OEMNADWD.INF: Calling Param_VerifyCard"
  338.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  339.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  340.         Debug-Output "OEMNADWD.INF: Param_VerifyCard succeeded"
  341.         Goto skipoptions
  342.     Endif
  343.     Set from = adapteroptions
  344.     Set to = skipoptions
  345.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  346.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  347.         Debug-Output "ShellCode error: cannot get an error string."
  348.         goto ShellCodeError
  349.     endif
  350.     set Error = $($R0)
  351.     Goto Warning
  352. skipoptions = +
  353.     ifint $(OldVersionExisted) == $(TRUE)
  354.         ifstr(i) $(!NTN_InstallMode) == configure
  355.             goto writeparameters
  356.         endif
  357.     endif
  358.     StartWait
  359.     ifint $(OldVersionExisted) == $(FALSE)
  360.         ifstr(i) $(!NTN_InstallMode) == "install"
  361.            Ifstr(i) $(DoCopy) == "YES"
  362.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  363.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  364.                   Goto ShellCodeError
  365.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  366.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  367.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  368.                       goto ShellCodeError
  369.                   endif
  370.                   set Error = $($R0)
  371.                   Goto fatal
  372.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  373.                   Goto successful
  374.               Endif
  375.               Set SrcDir = $($R1)
  376.            Endif
  377.            install "Install-Option"
  378.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  379.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  380.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  381.                   goto ShellCodeError
  382.               endif
  383.               set Error = $($R0)
  384.               goto fatal
  385.            endif
  386.         endif
  387.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  388.             $(ProductSoftwareName), +
  389.             $(ProductSoftwareName), +
  390.             $(ProductSoftware$(Option)Title), $(STF_CONTEXTINFNAME), +
  391.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  392.             $(NetEventDLL)
  393.         Set OEM_ABANDON_SOFTWARE = TRUE
  394.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  395.             Debug-Output "ShellCode error"
  396.             goto ShellCodeError
  397.         endif
  398.         set RegistryErrorIndex = $($R0)
  399.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  400.             EndWait
  401.             Debug-Output "Registry error: add software components"
  402.             CloseRegKey $($R1)
  403.             CloseRegKey $($R2)
  404.             CloseRegKey $($R3)
  405.             CloseRegKey $($R4)
  406.             CloseRegKey $($R5)
  407.             goto fatalregistry
  408.         endif
  409.         Set SoftProductKey      = $($R1)
  410.         Set SoftNetRuleKey      = $($R2)
  411.         Set SoftServiceKey      = $($R3)
  412.         Set SoftParameterKey    = $($R4)
  413.         Set SoftLinkageKey      = $($R5)
  414.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  415.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  416.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  417.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Title)},+
  418.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(Option)Description)},+
  419.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  420.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  421.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  422.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.             Debug-Output "ShellCode error."
  424.             goto ShellCodeError
  425.         endif
  426.         set RegistryErrorIndex = $($R0)
  427.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  428.             EndWait
  429.             Debug-Output "Resgitry error: add value list."
  430.             CloseRegKey $(SoftProductKey)
  431.             CloseRegKey $(SoftNetRuleKey)
  432.             CloseRegKey $(SoftServiceKey)
  433.             CloseRegKey $(SoftParameterKey)
  434.             CloseRegKey $(SoftLinkageKey)
  435.             goto fatalregistry
  436.         endif
  437.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  438.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  439.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  440.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  441.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  442.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  443.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  444.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  445.             Debug-Output "ShellCode error."
  446.             goto ShellCodeError
  447.         endif
  448.         set RegistryErrorIndex = $($R0)
  449.         CloseRegKey $(SoftProductKey)
  450.         CloseRegKey $(SoftNetRuleKey)
  451.         CloseRegKey $(SoftServiceKey)
  452.         CloseRegKey $(SoftParameterKey)
  453.         CloseRegKey $(SoftLinkageKey)
  454.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  455.             EndWait
  456.             Debug-Output "Resgitry error: add value list."
  457.             goto fatalregistry
  458.         endif
  459.     endif
  460.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  461.     ifint $($R4) != -1
  462.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  463.     endif
  464.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  465.         Debug-Output "Cannot add hardware component"
  466.         goto ShellCodeError
  467.     endif
  468.     set RegistryErrorIndex = $($R0)
  469.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  470.         EndWait
  471.         Debug-Output "Registry error: add hardware component"
  472.         Debug-Output $(RegistryErrorIndex)
  473.         CloseRegKey $($R1)
  474.         CloseRegKey $($R2)
  475.         CloseRegKey $($R3)
  476.         goto fatalregistry
  477.     endif
  478.     set KeyParameters = $($R3)
  479.     set KeyAdapterRules = $($R2)
  480.     set AdapterNumber = $($R4)
  481.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  482.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  483.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  484.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  485.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  486.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  487.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  488.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  489.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  490.         Debug-Output "ShellCode error"
  491.         goto ShellCodeError
  492.     endif
  493.     CloseRegKey $($R1)
  494.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  495.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  496.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  497.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  498.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  499.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  500.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  501.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  502.         Debug-Output "ShellCode error."
  503.         goto ShellCodeError
  504.     endif
  505.     set RegistryErrorIndex = $($R0)
  506.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  507.         EndWait
  508.         Debug-Output "Resgitry error: add value list."
  509.         CloseRegKey $(KeyParameters)
  510.         CloseRegKey $(KeyAdapterRules)
  511.         goto fatalregistry
  512.     endif
  513.     CloseRegKey $(KeyAdapterRules)
  514.     goto writeparameters
  515. writeparameters = +
  516.     IfContains $(Option) in $(EthernetCards)
  517.         set CardMediaType = 1
  518.         set NewValueList = {+
  519.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  520.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  521.                        {InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  522.                        {IOBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  523.                        {DMAChannel,$(NoTitle),$(!REG_VT_DWORD),$(DMAChannel)},+
  524.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)}+
  525.                        }
  526.         Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  527.         ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  528.             Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  529.         endif
  530.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.             Debug-Output "ShellCode error."
  532.             goto ShellCodeError
  533.         endif
  534.         set RegistryErrorIndex = $($R0)
  535.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  536.             Debug-Output "Registry error: Add value list"
  537.             CloseRegKey $(KeyParameters)
  538.             goto fatalregistry
  539.         endif
  540.     endif
  541.     CloseRegKey $(KeyParameters)
  542.     EndWait
  543.     goto successful
  544. bindingadapter =+
  545.     set Error = "Binding: Sorry, not yet implemented."
  546.     goto fatal
  547. removeadapter = +
  548.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  549.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  550.             $(ProductSoftwareName)
  551.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  552.             Debug-Output "ShellCode error"
  553.             goto ShellCodeError
  554.         endif
  555.         set RegistryErrorIndex = $($R0)
  556.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  557.             goto fatalregistry
  558.         endif
  559.     else
  560.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  561.             $(ProductSoftwareName), $(!NTN_RegBase)
  562.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  563.             Debug-Output "ShellCode error"
  564.             goto ShellCodeError
  565.         endif
  566.         set RegistryErrorIndex = $($R0)
  567.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  568.             goto fatalregistry
  569.         endif
  570.     endif
  571.     goto end
  572. UpgradeSoftware = +
  573.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  574.     Ifstr $(KeyProduct) != $(KeyNull)
  575.         install "Install-Update"
  576.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  577.             goto fatal
  578.         endif
  579.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  580.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  581.         CloseRegKey $(KeyProduct)
  582.     else
  583.         goto fatalregistry
  584.     endif
  585.     set iSearch = 1
  586. nextnetcard = +
  587.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  588.     set KeyNetcard = $($R0)
  589.     set iSearch = $($R1)
  590.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  591.     Ifstr $(KeyNetcard) != $(KeyNull)
  592.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  593.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  594.         CloseRegKey $(KeyNetcard)
  595.         goto nextnetcard
  596.     Endif
  597.     goto end
  598. successful = +
  599.     goto end
  600. abandon = +
  601.     ForListDo $(OEM_ABANDON_OPTIONS)
  602.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  603.             $(ProductSoftwareName), $($)
  604.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  605.             Debug-Output "ShellCode error"
  606.             goto ShellCodeError
  607.         endif
  608.         set RegistryErrorIndex = $($R0)
  609.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  610.             goto fatalregistry
  611.         endif
  612.     EndForListDo
  613.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  614.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  615.             $(ProductSoftwareName), FALSE
  616.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  617.             Debug-Output "ShellCode error"
  618.             goto ShellCodeError
  619.         endif
  620.         set RegistryErrorIndex = $($R0)
  621.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  622.             goto fatalregistry
  623.         endif
  624.     endif
  625.     goto end
  626. warning = +
  627.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  628.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  629.         goto ShellCodeError
  630.     endif
  631.     ifstr(i) $($R1) == "OK"
  632.         goto $(to)
  633.     else-ifstr(i) $($R1) == "CANCEL"
  634.         goto $(from)
  635.     else
  636.         goto "end"
  637.     endif
  638. nonfatalinfo = +
  639.     Set CommonStatus = STATUS_USERCANCEL
  640.     Set Severity = STATUS
  641.     goto nonfatalmsg
  642. nonfatal = +
  643.     Set Severity = NONFATAL
  644.     goto nonfatalmsg
  645. nonfatalmsg = +
  646.     ifstr(i) $(Error) == ""
  647.         Set Severity = NONFATAL
  648.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  649.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  650.             goto ShellCodeError
  651.         endif
  652.         set Error = $($R0)
  653.     endif
  654.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  655.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  656.         goto ShellCodeError
  657.     endif
  658.     ifstr(i) $($R1) == "OK"
  659.         goto $(from)
  660.     else
  661.         goto "end"
  662.     endif
  663. fatalregistry = +
  664.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  665.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666.         goto ShellCodeError
  667.     endif
  668.     set Error = $($R0)
  669.     goto fatal
  670. fataldetect = +
  671.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  672.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  673.         Debug-Output "ShellCode error: cannot get an error string."
  674.         goto ShellCodeError
  675.     endif
  676.     set Error = $($R0)
  677.     Goto fatal
  678. fatal = +
  679.     ifstr(i) $(Error) == ""
  680.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  681.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  682.             goto ShellCodeError
  683.         endif
  684.         set Error = $($R0)
  685.     endif
  686.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  687.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  688.         goto ShellCodeError
  689.     endif
  690.     goto setfailed
  691. ShellCodeError = +
  692.     set DlgType      = "MessageBox"
  693.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  694.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  695.     set STF_MB_TYPE  = 1
  696.     set STF_MB_ICON  = 3
  697.     set STF_MB_DEF   = 1
  698.     ui start "Error Message"
  699.     goto setfailed
  700. setfailed = +
  701.     set CommonStatus = STATUS_FAILED
  702.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  703.         set OEM_ABANDON_ON = FALSE
  704.         goto abandon
  705.     endif
  706.     goto end
  707. end = +
  708.     goto term
  709. term = +
  710.     Return $(CommonStatus)
  711. [PrepareDetectionDll]
  712.     Set NewDllName = $($0)
  713.     Set Status = STATUS_FAILED
  714.     read-syms GeneralConstants
  715.     Set DllValueName = "NetcardDlls"
  716.     OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  717.     Ifstr(i) $(KeySetup) == $(KeyNull)
  718.         Debug-Output "AMD: cant open System\Setup key"
  719.         Goto PDD_Return
  720.     Endif
  721.     Set DllFound = 0
  722.     GetRegValue $(KeySetup) $(DllValueName) DllNamesValue
  723.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  724.         Debug-Output "AMD: cant query NetcardDLLs value"
  725.         Goto PDD_Return
  726.     Endif
  727.     Debug-Output "AMD: DllNamesValue = "$(DllNamesValue)
  728.     Set DllNames = *($(DllNamesValue),4)
  729.     Debug-Output "AMD: DllNames = "$(DllNames)
  730.     ForListDo $(DllNames)
  731.         Ifstr(i) $($) == $(NewDllName)
  732.             Set DllFound = 1
  733.         Endif
  734.     EndForListDo
  735.     Ifint $(DllFound) == 0
  736.         Set DllNames = >($(DllNames),$(NewDllName))
  737.         Debug-Output "AMD: new DllNames = "$(DllNames)
  738.         Set ValueInfo = {$(DllValueName), $(NoTitle), $(!REG_VT_MULTI_SZ), $(DllNames)}
  739.         SetRegValue $(KeySetup) $(ValueInfo)
  740.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  741.             Set Status = STATUS_SUCCESSFUL
  742.         Endif
  743.     Else
  744.         Set Status = STATUS_USERCANCEL
  745.     Endif
  746.     CloseRegKey $(KeySetup)
  747. PDD_Return = +
  748.     Return $(Status)
  749. [Install-Option]
  750.     set STF_VITAL = ""
  751.     ifstr(i) $(AddCopy) == "YES"
  752.         AddSectionFilesToCopyList Files-AM1500T $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  753.     endif
  754.     ifstr(i) $(DoCopy) == "YES"
  755.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  756.        CopyFilesInCopyList
  757.     endif
  758.     ifstr(i) $(DoConfig) == "YES"
  759.     endif
  760.     Exit
  761. [Install-Update]
  762.    set STF_VITAL        = ""
  763.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  764.    AddSectionFilesToCopyList Files-AM1500T $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  765.    AddSectionFilesToCopyList Files-AMDNCDET $(SrcDir) $(!STF_WINDOWSSYSPATH)
  766.    exit
  767. [Install-Detection-Dll]
  768.    set STF_VITAL        = ""
  769.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  770.    AddSectionFilesToCopyList Files-AMDNCDET $(SrcDir) $(!STF_WINDOWSSYSPATH)
  771.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  772.    CopyFilesInCopyList
  773.    exit
  774. [Source Media Descriptions]
  775.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  776. [Signature]
  777.     FileType = MICROSOFT_FILE
  778. [GetSignature]
  779.     read-syms Signature
  780.     return $(FileType)
  781. [ProductType]
  782. STF_PRODUCT  = LanmanNT
  783. STF_PLATFORM = I386
  784. [Files-Inf]
  785. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  786. [Files-AM1500T]
  787. 1,AM1500T.SYS , SIZE=999
  788. [Files-AMDNCDET]
  789. 1,AMDNCDET.DLL , SIZE=999
  790. [LanguagesSupported]
  791.     ENG
  792. [OptionsTextENG]
  793.     AM1500T = "Advanced Micro Devices AM2100/AM1500T Adapter"
  794.     AM1500T1 = "Novell/Anthem NE1500T Adapter"
  795.     AM1500T2 = "Novell/Anthem NE2100 Adapter"
  796. [FileConstantsENG]
  797. ProCaption   = "Windows NT Setup"
  798. ProCancel    = "Cancel"
  799. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  800.                "Are you sure you want to cancel copying files?"
  801. ProCancelCap = "Network Setup Message"
  802. ProText1     = "Copying:"
  803. ProText2     = "To:"
  804. FunctionAM1500TTitle   = "AMD AM2100/AM1500T Adapter Setup"
  805. FunctionAM1500T1Title   = "Novell/Anthem NE1500T Adapter Setup"
  806. FunctionAM1500T2Title   = "Novell/Anthem NE2100 Adapter Setup"
  807. ProductSoftwareAM1500TDescription       = "AMD AM2100/AM1500T Driver"
  808. ProductSoftwareAM1500T1Description      = "Novell/Anthem NE1500T Driver"
  809. ProductSoftwareAM1500T2Description      = "Novell/Anthem NE2100 Driver"
  810. ProductHardwareAM1500TDescription       = "AMD AM2100/AM1500T Adapter"
  811. ProductHardwareAM1500T1Description      = "Novell/Anthem NE1500T Adapter"
  812. ProductHardwareAM1500T2Description      = "Novell/Anthem NE2100 Adapter"
  813. ProductSoftwareAM1500TTitle     = "AMD Driver"
  814. ProductSoftwareAM1500T1Title    = "Novell/Anthem NE1500T Driver"
  815. ProductSoftwareAM1500T2Title    = "Novell/Anthem NE2100 Driver"
  816. ProductHardwareAM1500TTitle     = "AMD AM2100/AM1500T Adapter"
  817. ProductHardwareAM1500T1Title    = "Novell/Anthem NE1500T Adapter"
  818. ProductHardwareAM1500T2Title    = "Novell/Anthem NE2100 Adapter"
  819. ShellCodeErrorTitle     = "Error: "$(Function$(Option)Title)
  820. ShellCodeErrorText      = "Shell Code Error."
  821. [DialogConstantsENG]
  822. Help        = "&Help"
  823. Exit        = "Cancel"
  824. OK          = "OK"
  825. HelpContext = ""
  826. Continue    = "Continue"
  827. Cancel      = "Cancel"
  828. [FileDependentDlgENG]
  829. DlgType = "MultiCombo"
  830. DlgTemplate = "WD"
  831. Caption = $(Function$(Option)Title)
  832. Combo1Label = "&IRQ Level:"
  833. Combo2Label = "&DMA Channel:"
  834. Combo3Label = "I/&O Port Address:"
  835. Combo1List = $(IRQ_List)
  836. Combo1Out  = $(IRQLevel)
  837. Combo2List = $(DMAChannelList)
  838. Combo2Out  = $(DMAChannel)
  839. Combo3List = $(IOBaseAddressHexList)
  840. Combo3Out  = $(IOBaseAddress)
  841. ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  842. ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  843. EditTextIn = ""
  844. EditTextLim = ""
  845. NotifyFields = {NO, NO, NO}
  846. HelpContext = $(!IDH_DB_OEMNADAM_INS)
  847.